﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

public partial class _Default : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {
        //http的Get方法
        //LbQueryString.Text = "limit=" + Request.QueryString["limit"] + ",page=" + Request["page"];
        LbQueryString.Text = "limit=" + Request.QueryString["limit"] + ",page=" + Request.QueryString["page"];
        //http的Post方法
        LbForm.Text = Request.Form["TbUsername"];
        LbForm2.Text = Request.Form["username"] + "," + Request["submit"];
        //Server Variables
        foreach (var item in Request.ServerVariables.Keys)
        {
            LbServerVariables.Text += "Key:" + item + "<br>";
        }
        LbServerVariables.Text += "服务器地址：" + Request.ServerVariables["LOCAL_ADDR"];
        LbServerVariables.Text += "服务器端口：" + Request.ServerVariables["SERVER_PORT"];
        LbServerVariables.Text += "客户端地址：" + Request.ServerVariables["REMOTE_HOST"];
        LbServerVariables.Text += "客户端端口：" + Request.ServerVariables["REMOTE_PORT"] + "<br>";
        //Browser
        LbBrowser.Text = "浏览器类型" + Request.Browser["Browser"] + "<br>浏览器版本号：" + Request.Browser.Version;
        Response.Write(Request.UserAgent + "<br>");
        Response.Write(Request.Cookies.Keys.Count + "<br>");
        //Response.Write(Request.Cookies.Get("ASP.NET_SessionId").Value + "<br>");
    }
}